package heliotrope.display
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	
	import heliotrope.net.loader.IStateTarget;
	import heliotrope.net.loader.LoadState;
	

	public class AutoBitmap extends Bitmap implements IStateTarget
	{
		private var _loadState:String;
		public function AutoBitmap()
		{
			super();
			_loadState = LoadState.NOT_LOAD;
		}

		public function saveData(data:Object):void
		{
			if(!(data is BitmapData))
			{
				throw new ArgumentError("Can't save data to MapTile!");	
			}
			this.bitmapData = data as BitmapData;
		}	
		public function get loadState():String
		{
			return _loadState;
		}
		
		public function set loadState(value_:String):void
		{
			_loadState = value_;
		}

	}
}